import datetime


def FactorParams():
    factor_list = {}
    #
    # factor_list["Northbound_NetBuy_Diff"] = {"Offset": 1,
    #                                          "Transfrom": {"FactorName": } ,"Method": "WeeklySum"}


    # ---融资规模---
    factor_list["IPO_Amt_Fore"] = {"Offset": 0, "Method": "WeeklySum"}
    factor_list["SEO_Amt_Fore"] = {"Offset": 0, "Method": "WeeklySum"}
    factor_list["UnRestrict_Amt"] = {"Offset": 0, "Method": "WeeklySum"}
    # return factor_list
    #
    factor_list["ShareHoldingChg_Plan"] = {"Offset": 1, "DateTime1": datetime.datetime(2017, 6, 1), "Method": "WeeklySum"}

    # 融资融券
    factor_list["MarginTrade_FinBalance"] = {"Offset": 1, "DateTime1": datetime.datetime(2016, 6, 1), "Method": "WeeklyAvg"}
    factor_list["MarginTrade_Fin2Cap"] = {"Offset": 1, "DateTime1": datetime.datetime(2016, 6, 1), "Method": "WeeklyAvg"}
    factor_list["MarginTrade_FinAmt2TotalAmt"] = {"Offset": 1, "DateTime1": datetime.datetime(2016, 6, 1), "Method": "WeeklyAvg"}

    # return factor_list

    # ---市场情绪---
    factor_list["CBOE_VIX_50ETF"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["Turnover_TotalA"] = {"Offset": 1, "Method": "WeeklyAvg"}

    # 大宗交易
    factor_list["BlockTrade_Amt"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["BlockTrade_Discount"] = {"Offset": 1, "Method": "WeeklyAvg"}

    # 期限结构
    factor_list["IF_FutSpotBasis_Weighted"] = {"Offset": 1, "Method": "WeeklyAvg"}

    # ---Market Structure---
    factor_list["BeatMarketRatio_20D_000300.SH"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["BeatMarketRatio_20D_000905.SH"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["ReturnVolatility_20D_TotalA"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["ReturnCorr_20D_TotalA"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["ReturnGap20vs80_20D_TotalA"] = {"Offset": 1, "Method": "WeeklyAvg"}

    # ---Money Market---
    factor_list["Repo001"] = {"Offset": 1, "Method": "WeeklyAvg"}
    datetime1 = datetime.datetime(2013, 1, 1)

    # ---理财市场---
    factor_list["Licai_TotalMkt_1M"] = {"Offset": 1, "Period": "Weekly", "DateTime1": datetime1}
    factor_list["Licai_TotalMkt_1Y"] = {"Offset": 1, "Period": "Weekly", "DateTime1": datetime1}

    # return factor_list

    # ---Bond Market---
    datetime1 = datetime.datetime(2007, 1, 1)
    factor_list["Tbond_YTM_10Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}
    factor_list["Tbond_YTM_1Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}
    factor_list["CorpBond_AAA_YTM_5Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}
    factor_list["CorpBond_AAA_YTM_10Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}
    factor_list["Term_Spread_10Y1Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}
    factor_list["Credit_Spread_10Y"] = {"Offset": 1, "Method": "WeeklyAvg", "DateTime1": datetime1}

    # ---FX Market---
    factor_list["USDCNH_USDCNY_Spread"] = {"Offset": 1, "Method": "WeeklyAvg"}
    factor_list["USDCNH_Term_Spread"] = {"Offset": 1, "Method": "WeeklyAvg"}

    # ---Central Bank---
    factor_list["CB_NetInvested"] = {"Offset": 1, "Period": "Weekly"}

    return factor_list